
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<title>Minimal and Clean Sign up / Login and Forgot Form by FreeHTML5.co</title>
	<meta name="viewport" content="width=device-width, initial-scale=1" />
	<meta name="description" content="Free HTML5 Template by FreeHTML5.co" />
	<meta name="keywords" content="free html5, free template, free bootstrap, html5, css3, mobile first, responsive" />

	<meta property="og:title" content=""/>
	<meta property="og:image" content=""/>
	<meta property="og:url" content=""/>
	<meta property="og:site_name" content=""/>
	<meta property="og:description" content=""/>
	<meta name="twitter:title" content="" />
	<meta name="twitter:image" content="" />
	<meta name="twitter:url" content="" />
	<meta name="twitter:card" content="" />

	<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
	<link rel="shortcut icon" href="favicon.ico" />

	<link rel="stylesheet" href="../bootstrap-3.3.7-dist/css/bootstrap.css" />
	<link rel="stylesheet" href="../css/animate.css" />
	<link rel="stylesheet" href="../css/style.css" />


		<!-- Modernizr JS -->
	<script src="js/modernizr-2.6.2.min.js"></script>
	<!-- FOR IE9 below -->
	<!--[if lt IE 9]>
	<script src="js/respond.min.js"></script>
	<![endif]-->

	</head>
	<body class="style-3">

	<div class="container">
		<div class="row">
			<div class="col-md-4 col-md-push-8">
				<!-- Start Sign In Form -->
				<form id="form-login" class="fh5co-form animate-box" method="post" data-animate-effect="fadeInRight">
					<h2>登录</h2>
					<div class="form-group">
						<div class="alert alert-success" role="alert">请输入账号和密码</div>
						<input type="text" value="telephone" name="type" hidden="hidden" />
					</div>
					<div class="form-group">
						<label for="identifier" class="sr-only">Phone</label>
						<input type="text" class="form-control" id="identifier" name="identifier" placeholder="Phone" value="13886777456" autocomplete="off" />
					</div>
					<div class="form-group">
						<label for="password" class="sr-only">Password</label>
						<input type="password" class="form-control" id="password" name="credential" placeholder="Password" value="13886777456" autocomplete="off" />
					</div>
					<div class="form-group">
						<label for="remember"><input type="checkbox" id="remember" /> 记住我</label>
						<a href="/wxLogin">微信登录</a>
					</div>
					<div class="form-group">
						<p>暂无账号? <a href="/signUp">注册</a> | <a href="/forgot">忘记密码?</a></p>
					</div>
					<div class="form-group">
						<input type="button" id="btn-login" value="登录" class="btn btn-primary" />
					</div>
				</form>
			</div>
		</div>
		<div class="row" style="padding-top: 60px; clear: both;">
			<div class="col-md-12 text-center"><p><small>&copy; All Rights Reserved. More Templates <a href="" target="_blank" title=""></a> - Collect from <a href="" title="" target="_blank"></a></small></p></div>
		</div>
	</div>


	<!-- jQuery -->
	<script src="../jquery/jquery-3.3.1.min.js"></script>
	<!-- Bootstrap -->
	<script src="../bootstrap-3.3.7-dist/js/bootstrap.js"></script>
	<!-- Placeholder -->
	<script src="../js/jquery.placeholder.min.js"></script>
	<!-- Waypoints -->
	<script src="../js/jquery.waypoints.min.js"></script>
	<!-- Main JS -->
	<script src="../js/main.js"></script>

	<script>
        $("#btn-login").click(function () {
            console.log("btn-login click()");
            $.ajax({
            	type: 'post',
            	url:'login',
            	data:$('#form-login').serialize(),
            	success: function (data) {
            		console.log(data);
            		if("login failure"==data){
                        $(".alert").html("账号或者密码错误");
					}else{
                        $(".alert").html("成功登录");
                        setTimeout(function () {
                            location.href=data;
                        },1000);
					}
            	},
            	error: function () {
            	}
            });
        });
	</script>
	</body>
</html>

